-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add -Zdirect-minimal-versions
compatibility and testing.
#7527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…whoops, I only just noticed that there is already a similar test for |
0b03250
to
02746b0
Compare
Oooo -Ztarget-minimal-version is super cool!
This fully subsumes the naga test and it should be removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super cool, one note, plus the naga check needs to be removed.
The mac version needs to be aarch64 - these are M1 runners. |
I've redesigned the CI change so that instead of adding anything “new”, it just expands the coverage of the previous |
…inimal-versions`, but not deny warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Connections
Prevents problems like the one described in #7526.
Description
This PR adds a CI job which confirms building with
cargo update -Zdirect-minimal-versions
on some platforms. This unstable feature updates all dependencies from the workspace packages to non-workspace packages to the minimum version allowed by the workspace’s dependency specifications, thus ensuring that the project will not build if it actually depends on items newer than its dependency specifications.It also updates dependency versions to be compatible with
-Zdirect-minimal-versions
. Specifically,cargo update -Zdirect-minimal-versions
will fail if any transitive dependency has a higher dependency requirement than the workspace. This should largely make no difference since those versions would have been required anyway; however, it may increase the minimum dependency requirement seen by users of a single package from crates.io (e.g. users ofnaga
withoutwgpu
). That could be a reason to reject this change.Also, this change will increase the
Cargo.toml
maintenance burden, because increasing some dependency versions may require also increasing others even when that change is a noop for any normal build.Testing
I confirmed that tests pass with the dependencies actually updated, except for
naga back::msl::writer::test_stack_size
. However, the added CI job does not run tests, onlycargo check
, to minimize the additional CI cost. Thus, CI will catch use of newer items, but not bugs in old dependencies.Squash or Rebase?
Rebase
Checklist
cargo fmt
.taplo format
.cargo clippy --tests
. If applicable, add:--target wasm32-unknown-unknown
cargo xtask test
to run tests.CHANGELOG.md
entry.